using System;

namespace SharpMud.Net.Telnet.Session
{
	public interface IFeatureNegotiationAgent
	{
		/// <summary>
		/// Gets/Sets the behavior of this feature negotiator.
		/// </summary>
		FeatureNegotiationBehavior Behavior {get;set;}
		
		/// <summary>
		/// Gets the status of this feature negotiator.
		/// TriState.True indicates the feature is explicitly in use, TriState.False indicates that the
		/// feature is explicitly not in use, and TriState.Default indicates to assume an implicit default
		/// state.
		/// </summary>
		System.TriState Status			{get;}
		/// <summary>
		/// Gets the status of this feature negotiator - but returning an implicit state if the negotiator
		/// is in a 'Default' state
		/// </summary>
		bool			EffectiveStatus {get;}

		/// <summary>
		/// Tell the negotatior to negotiate to turn the feature (and support for it) on
		/// </summary>
		void			TurnFeatureOn();
		/// <summary>
		/// Tell the negotiator to negotiate to turn the feature (and support for it) off
		/// </summary>
		void			TurnFeatureOff();
	}

	public enum FeatureNegotiationBehavior
	{
		/// <summary>
		/// The feature negotiator will ask the client to support this feature
		/// </summary>
		DemandClientSupport,
		/// <summary>
		/// The feature negotiator will reject a client's attempt to enable this feature
		/// </summary>
		RejectClientOnDemand,
		/// <summary>
		/// The feature negotiator will accept a client's attempt to enable this feature
		/// </summary>
		AcceptClientOnDemand
	}
}
